package com.woniu.crowd.service.dto;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;
import java.util.Date;

@Data
@Document(indexName = "selectspu")
public class SelectEsModelDto {
    /**
     * 甄选信息id
     */
    @Id
    @Field(type = FieldType.Integer, name = "selectProductId")
    private Integer selectProductId;
    /**
     * 甄选状态( CREATED 已创建，CANCEL已取消，FINISH 已完成）
     */
    @Field(type = FieldType.Text, name = "selectStatus")
    private String selectStatus;

    /**
     * 甄选名额数量
     */
    @Field(type = FieldType.Integer, name = "selectUserCount")
    private Integer selectUserCount;

    /**
     * 开始时间
     */
    @Field(type = FieldType.Text, name = "startTime")
    private Date startTime;

    /**
     * 结束时间
     */
    @Field(type = FieldType.Text, name = "endTime")
    private Date endTime;
    /**
     * spu_id
     */

    @Field(type = FieldType.Integer, name = "spuId")
    private Integer spuId;

    /**
     * 商品名
     */
    @Field(type = FieldType.Text, name = "spuName")
    private String spuName;
    /**
     * 分类ID
     */
    @Field(type = FieldType.Integer, name = "categoryId")
    private Integer categoryId;


    /**
     * 分类名
     */
    @Field(type = FieldType.Text, name = "categoryName")
    private String categoryName;

    /**
     * 商品介绍
     */
    @Field(type = FieldType.Text, name = "introduction")
    private String introduction;

    /**
     * 头图
     */
    @Field(type = FieldType.Keyword, name = "spuMainPic")
    private String spuMainPic;


    /**
     * 最低价格
     */
    @Field(type = FieldType.Double, name = "minPrice")
    private BigDecimal minPrice;

    /**
     * 最高价格
     */
    @Field(type = FieldType.Double, name = "maxPrice")
    private BigDecimal maxPrice;
}
